<% for fund in @funds %>
<% content_tag :div, :class => 'container' do -%>
	<% content_tag :div, :class => 'header' do -%>
		<% content_tag :h3, :class => 'headertext' do -%>
			<%= content_tag :img, nil, :src => '/images/icons/icons_56.png', :class => 'icon' -%>
			<% content_tag :a, :href => '/finances/edit_fund/' + fund.id.to_s do -%>
				<%= content_tag :span, fund.first_entry.name -%>	
				<% content_tag :div, :class => 'flright' do -%>
					<%= render :partial => 'partials/newline', :locals => { :@fund_id => fund.id }%>
				<% end -%>
			<% end -%>	
		<% end -%>
		<% content_tag :div, :class => 'container' do -%>
			<%= content_tag :span, fund.first_entry.note, :class => 'headertext' %>
		<% end -%>
	<% end -%>
	<% content_tag :div, :class => 'column50' do %>
		<%= content_tag :strong, 'Credits', :class => 'headertext' -%>
		<% for item in LineItem.find(:all, :conditions => ["fund_id = ?", fund.id]).delete_if{|i| i.first_entry.amount < 0 } -%>
			<% content_tag :a, :href => '/finances/edit/' + item.id.to_s, :class=>"lnk" do -%>
				<%= content_tag :img, nil, :src => '/images/icons/icons_42.png', :class => 'icon' -%>
				<%= content_tag :strong, item.first_entry.name -%>
				<%= content_tag :div, item.first_entry.amount, :class => 'flright' -%> 
			<% end -%>
		<% end -%>
	<% end -%>
	<% content_tag :div, :class => 'column50' do %>
	<%= content_tag :strong, 'Debits', :class => 'headertext' -%>
		<% for item in LineItem.find(:all, :conditions => ["fund_id = ?", fund.id]).delete_if{|i| i.first_entry.amount > 0 } -%>
			<% content_tag :a, :href => '/finances/edit/' + item.id.to_s, :class=>"lnk" do -%>
				<%= content_tag :img, nil, :src => '/images/icons/icons_42.png', :class => 'icon' -%>
				<%= content_tag :strong, item.first_entry.name -%>
				<%= content_tag :span, item.first_entry.amount, :class => 'flright red'  -%> 
			<% end -%>
		<% end -%>
	<% end -%>
<% end -%>
<% end -%>